package view;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

import model.Recommendation;

@SuppressWarnings("serial")
public class OpenRecAction extends AbstractAction {
	
	private Recommendation my_rec;
	
	public OpenRecAction(Recommendation the_rec) {
		super("Open Rec.");
	    putValue(Action.MNEMONIC_KEY, KeyEvent.VK_N);
	    putValue(Action.SELECTED_KEY, true);
		my_rec = the_rec;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		my_rec.open();
	}

}
